package com.javatest.ajax.app3.dao;

import com.javatest.ajax.app3.bean.Department;
import com.javatest.dao.DaoBase;

import java.util.List;

/**
 * @author lzy
 * @version v1.0
 * Create DateTime: 2018/9/5 17:18
 */
public class DepartmentDao extends DaoBase<Department> implements IDepartmentDao {
    @Override
    public List<Department> getDepartments(int locationId) {
        String sql = "SELECT d.department_id as departmentId, d.department_name as departmentName FROM departments as d WHERE d.location_id=?";
        return getForList(sql, locationId);
    }
}
